﻿@model IEnumerable<iDMS.Models.Drawing>
@using MvcHtmlHelpers

<script type="text/javascript">
    $(function () {
        $("a.action").button();

    });
</script>

<div id="list">
    <table>
        <tr>
            <th>
            </th>
            <th>
                Identifier
            </th>
            <th>
                Name
            </th>
            <th>
                Manufacturer
            </th>
            <th>
                Design Change
            </th>
            <th>
                Innaplicable
            </th>
            <th>
                Change Builder
            </th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.ActionLink("Details", "Details", new { id = item.DrawingID }, new { @class = "action" })
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Identifier)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Manufacturer.Name)
                    @Html.CountryFlag(item.Manufacturer.Country.ISO3166Alfa2)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DesignChange.Identifier)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DesignChange1.Identifier)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Employee.FullNameDepartment)
                </td>
            </tr>
        }
    </table>
</div>